#ifndef _SAMPLE_BUFFER_H_
#define _SAMPLE_BUFFER_H_
#include <stdbool.h>
#include <stdint.h>

typedef struct SampleBufferInt16{
    int16_t *buffer;
    bool isInit;
	bool isFull;
    uint16_t capacity;
	uint16_t bufferIndex; 
    void (*appendDataBack)(struct SampleBufferInt16*, int16_t);
    double (*getRootMeanSquare)(int16_t*, uint16_t);
}SampleBufferInt16;

void SampleBufferInt16Init(SampleBufferInt16 *sampleBuffer, int16_t *buffer, int16_t capacity);
#endif  /* _SAMPLE_BUFFER_H_ */